{{define "book/list_3.html"}}
    {{ template "header".}}
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: initial">
        <legend style="text-align: center">填报完成书稿列表</legend>
    </fieldset>
    <form method="get" action="/book/list?Stage=3">
        <input type="hidden" name="Stage" value="3">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">分社</label>
                <div class="layui-input-block">
                    <input type="text" name="FenShe" autocomplete="off" class="layui-input"
                           value="{{.form.Get "FenShe"}}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">书名</label>
                <div class="layui-input-block">
                    <input type="text" name="Name" autocomplete="off" class="layui-input" value="{{.form.Get "Name"}}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">编号</label>
                <div class="layui-input-inline">
                    <input type="text" name="CustomID" autocomplete="off" class="layui-input"
                           value="{{.form.Get "CustomID"}}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">责任编辑</label>
                <div class="layui-input-inline">
                    <div class="layui-input-inline">
                        <input type="text" name="Editor" autocomplete="off" class="layui-input"
                               value="{{.form.Get "Editor"}}">
                    </div>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-inline">
                    <input type="text" name="CaiCha" autocomplete="off" class="layui-input"
                           value="{{.form.Get "CaiCha"}}">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">查询</button>
                </div>
            </div>
        </div>
    </form>
    <div style="width:auto; height:800px; overflow:scroll;">
        <table class="layui-table" lay-filter="test" style="align-content: center">
            <thead>
            <tr>
                <th>编号</th>
                <th>书号</th>
                <th>选题号</th>
                <th>书名</th>
                <th>页码</th>
                <th>备注</th>
                <th>开本</th>
                <th>印刷颜色</th>
                <th>分社</th>
                <th>责编</th>
                <th>版次</th>
                {{if eq $.user.Role  1}}
                    <th>加价</th>
                {{end}}
                <th>状态操作</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>{{range .ctx.Data}}
                <tr>
                    <td>{{.CustomID}}</td>
                    <td>{{.BookNo}}</td>
                    <td>{{.XuanTiHao}}</td>
                    <td>{{short .Name 20}}</td>
                    <td>{{.PageCount}}</td>
                    <td>{{.CaiCha}}</td>
                    <td>{{.KaiBen}}</td>
                    <td>
                        {{if eq .PrintingColor 1}}黑白{{end}}
                        {{if eq .PrintingColor 2}}双色{{end}}
                        {{if eq .PrintingColor 3}}四色{{end}}
                    </td>
                    <td>{{.FenShe}}</td>
                    <td>{{.Editor}}</td>
                    <td>{{.Version}}</td>
                    {{if eq $.user.Role  1}}
                        <td>{{.PlusPrice}}</td>
                    {{end}}
                    <td>
                        {{if statusIsStart .}}
                            <button type="button" class="layui-btn layui-btn-sm"
                                    onclick="stepPost('/book/finishStatus?id={{.ID}}&status={{.Status}}')">
                                完成{{bookStatusName .Status}}</button>
                        {{else}}
                            <button type="button" class="layui-btn layui-btn-sm"
                                    onclick="stepPost('/book/startStatus?id={{.ID}}&status={{.Status}}')">
                                开始{{bookStatusName .Status}}</button>
                        {{end}}
                    </td>
                    <td>
                        <a href="/book/detail?id={{.ID}}">
                            <button type="button" class="layui-btn layui-btn-sm">查看</button>
                        </a>
                    </td>
                </tr>
            {{end}}</tbody>
        </table>
    </div>
    {{template "page" .ctx}}
    {{template "footer" .}}
{{end}}